#ifndef __BSP_SPI_H
#define __BSP_SPI_H

#include "imx6u.h"

void spi_master_init(ECSPI_Type * base , unsigned char channel);
unsigned char spi_readwrite_byte(ECSPI_Type *base,unsigned char txdata,unsigned char channel);
void spi_write_byte(ECSPI_Type *base,unsigned char txdata,unsigned char channel);
unsigned char spi_read_byte(ECSPI_Type *base);


#endif 